﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RXY_Mall.Application.Finance.Dto
{
    public class SettlementDto
    {
        public int id { get; set; }
        public int shop_id { get; set; }
        public int order_id { get; set; }
        public string order_no { get; set; }
        public byte order_type { get; set; }
        public decimal order_total { get; set; }
        public decimal service_rate { get; set; }
        public decimal money { get; set; }
        public int account_period { get; set; }
        public DateTime? settlement_time { get; set; }
        public System.DateTime add_time { get; set; }
        /// <summary>
        /// 状态（1待结算，2正在结算，3已取消，4退款待返款，5已退款，6结算成功,7店铺信息异常,8退款金额异常）
        /// </summary>
        public byte status { get; set; }
        public string remark { get; set; }
        /// <summary>
        /// FS+时间(yyMMddHHmmdd)+6位随机数
        /// </summary>
        public string settlement_no { get; set; }
    }
    public class FinanceReturnDto {
        public int id { get; set; }
        public int shop_id { get; set; }
        public int order_id { get; set; }
        public string order_no { get; set; }
        public decimal money { get; set; }
        public DateTime? handing_time { get; set; }
        public System.DateTime add_time { get; set; }
        /// <summary>
        /// 类型 1冻结2欠款
        /// </summary>
        public byte type { get; set; }
        /// <summary>
        /// 状态1 待处理 2已处理
        /// </summary>
        public byte status { get; set; }
        public string remark { get; set; }

        public int settlement_id { get; set; }
        /// <summary>
        /// FS+时间(yyMMddHHmmdd)+6位随机数
        /// </summary>
        public string settlement_no { get; set; }
        /// <summary>
        /// FR+时间(yyMMddHHmmdd)+6位随机数
        /// </summary>
        public string return_no { get; set; }
    }
    public class FinanceLogDto {
        public int id { get; set; }
        public int relation_id { get; set; }
        /// <summary>
        /// 交易类型(10缴纳保证金,11保证金抵扣退款,12补缴保证金,20申请提现,21提现手续费,22提现拒绝退回,23提现退回手续费,30订单结算,31订单退款扣款
        /// </summary>
        public int trade_type { get; set; }
        /// <summary>
        /// 货币类型 1:余额 2:蚨豆 3:经验值 
        /// </summary>
        public byte currency { get; set; }
        /// <summary>
        /// 收支类型（1收,2支）
        /// </summary>
        public byte in_out { get; set; }
        public decimal before { get; set; }
        public decimal end { get; set; }
        public string remark { get; set; }
        public System.DateTime add_time { get; set; }
        /// <summary>
        /// FL+时间(yyMMddHHmmdd)+6位随机数
        /// </summary>
        public string log_no { get; set; }
        public int shop_id { get; set; }
        public int order_id { get; set; }
        public string order_no { get; set; }
        public string relation_no { get; set; }

        public string withdrawal_card_no { get; set; }
    }

    public class WithdrawalDto
    {
        public int id { get; set; }
        //public int shop_id { get; set; }
        public string company_name { get; set; }
        public string bank_name { get; set; }
        public string bank_cardno { get; set; }
        public string account_holder { get; set; }
        public decimal money { get; set; }
        public decimal fee_rate { get; set; }
        public decimal fee { get; set; }
        //public int handling_id { get; set; }
        public string handling_time { get; set; }
        //public int manager_id { get; set; }
        public DateTime add_time { get; set; }
        /// <summary>
        /// 状态（1已申请，2已取消，3已通过，4已拒绝）
        /// </summary>
        public byte status { get; set; }
        public string remark { get; set; }
        /// <summary>
        /// FW+时间(yyMMddHHmmdd)+6位随机数
        /// </summary>
        public string withdrawal_no { get; set; }
    }

    public class ShopPropertyDto {
        public int id { get; set; }
        public int goods_count { get; set; }
        public int order_count { get; set; }
        public decimal deposit { get; set; }
        public decimal balances { get; set; }
        public decimal balance_freeze { get; set; }
        public decimal balance_due { get; set; }
        public decimal balance_settlement { get; set; }
    }

    public class OrderStatisticsDto
    {
        public decimal today_order_total { get; set; }
        public decimal today_order_number { get; set; }
        public decimal today_order_money { get; set; }

        public decimal week_order_total { get; set; }
        public decimal week_order_number { get; set; }
        public decimal week_order_money { get; set; }

        public decimal month_order_total { get; set; }
        public decimal month_order_number { get; set; }
        public decimal month_order_money { get; set; }

        public decimal seven_order_total { get; set; }
        public decimal seven_order_number { get; set; }
        public decimal seven_order_money { get; set; }

        public decimal thirty_order_total { get; set; }
        public decimal thirty_order_number { get; set; }
        public decimal thirty_order_money { get; set; }

        public decimal year_order_total { get; set; }
        public decimal year_order_number { get; set; }
        public decimal year_order_money { get; set; }
    }
}
